
const Base_URL = "https://bb80-117-152-145-15.jp.ngrok.io"
// const Base_URL = "http://localhost:3000"
export default function (url,data={},method='GET'){
  return new Promise((resolve,reject)=>{
    wx.request({
      url: `${Base_URL}${url}`,
      method,
      data,
      header:{
        cookie:'MUSIC_U=de8a119839a7db4400925c1729345556caac8ace354b215a7be19e346fb216d4993166e004087dd3f370e0cc392dc39fc020550f23c16e02c17d7ab118d2b51aaaa87aeaed2d4cf6a0d2166338885bd7; Max-Age=1296000; Expires=Thu, 18 Aug 2022 10:31:19 GMT; Path=/; Domain=.music.163.com; HTTPOnly',
        'ngrok-skip-browser-warning':'*'
      },
      success:(res)=>{
        resolve(res.data)
      },
      fail:(error)=>{
        console.log(error);
      }
    })
  })
}